<?php


namespace app\common\services;


use think\Db;

class MoneyAccount
{
    public function index($id)
    {
        //$ data = model('user')->where('id',$id)->field('id')->find();
        $field = 'a.*,b.id,c.id,d.id';
        $data = model('user')
            ->where('a.id','=',$id)
            ->alias('a')
            ->join('moneyShopping b','a.id = b.us_id ')
            ->join('moneyTeam c','a.id = c.us_id ')
//            ->join('moneyTeam c','a.id = c.us_id ')
            ->join('moneyTixian d','a.id = d.us_id ')->where('d.gong_tx_s','=',null)
            ->field($field)
            ->select();


//        halt(Db::name('user')->getLastSql());

        halt($data);

        halt($data);
        halt($id);

    }

}